﻿using WpfAi.Vm;
using WpfAi.Enum;
using Brilliants.UI;

namespace WpfAi
{
    /// <summary>
    /// QRCodeWindow.xaml 的交互逻辑
    /// </summary>
    public partial class QRCodeWindow : NbWindow
    {
        EnumWindowType enumWindowType;
        EnumBoardType enumBoardType;
        public QRCodeWindow(EnumWindowType windowType, EnumBoardType boardType)
        {
            InitializeComponent();
            enumWindowType = windowType;
            enumBoardType = boardType;
        }

        private void NbButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            var dataContext = this.DataContext as QRCodeWindowVm;
            //if (GlobalEnvironment.WindowType == EnumWindowType.Screen && enumBoardType == EnumBoardType.Integrate)
            //{
            //    if (string.IsNullOrEmpty(dataContext.PCBQRCode))
            //        return;
            //}
            //else
            //{
            //    if (string.IsNullOrEmpty(dataContext.PCBQRCode) || string.IsNullOrEmpty(dataContext.ScreenQRCode))
            //        return;
            //}
            this.DialogResult = true;
            this.Close();
        }
    }
}
